package com.sngamelib.topdownshooter;

public class DroneGroup
{
	private CycledGroup<Drone> droneGroup;
	private FormationType formation;
	
	DroneGroup()
	{
		droneGroup = new CycledGroup<Drone>();
		formation = null;
	}
	
	DroneGroup(Drone _d, FormationType _f)
	{
		droneGroup = new CycledGroup<Drone>(_d);
		formation = _f;
	}
	
	DroneGroup(Drone _d, FormationType _f, int _mgs)
	{
		droneGroup = new CycledGroup<Drone>(_d, _mgs);
		formation = _f;
	}
	
	DroneGroup(CycledGroup<Drone> _dg, FormationType _f)
	{
		droneGroup = new CycledGroup<Drone>(_dg);
		formation = _f;
	}

	DroneGroup(Group<Drone> _dg, FormationType _f)
	{
		droneGroup = new CycledGroup<Drone>(_dg);
		formation = _f;
	}
	
	DroneGroup(DroneGroup _dg)
	{
		formation = _dg.getFormation();
		
		int i = 0;
		while(i < _dg.getGroupSize())
		{
			droneGroup.Add(_dg.getDrone(i));
			i++;
		}
	}
	
	public Drone getDrone(int _index)
	{
		return droneGroup.Get(_index);
	}
	
	public Drone getDrone(Drone _d)
	{
		return droneGroup.Get(_d);
	}
	
	public int getGroupSize()
	{
		return droneGroup.getSize();
	}
	
	public int addDrone(Drone _d)
	{
		return droneGroup.Add(_d);
	}
	
	public void setDroneAt(int _index, Drone _d)
	{
		droneGroup.Set(_index, _d);
	}
	
	public boolean remDrone(Drone _d)
	{
		return droneGroup.Remove(_d);
	}
	
	public boolean remDroneAt(int _index)
	{
		return droneGroup.RemoveAt(_index);
	}
	
	public void setFormation(FormationType _ft)
	{
		formation = _ft;
	}
	
	public FormationType getFormation()
	{
		return formation;
	}
}
